const routes = [
  {
    path: '/',
    name: 'Layout',
    redirect: '/home',
    component: () => import('@/layout/index.vue'),
    meta: {
      title: '首页'
    },
    children: [
      {
        path: '/home',
        name: 'Home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '团购券兑换',
          hasFooter: true,
        }
      },
      {
        path: '/order',
        name: 'Order',
        redirect: '/order/list',
        component: () => import('@/views/order/index.vue'),
        meta: {
          title: '我的订单',
        },
        children: [{
          path: 'list',
          name: 'OrderList',
          component: () => import('@/views/order/list.vue'),
          meta: {
            title: '我的订单',
            hasFooter: true,
          },
        },
        {
          path: 'detail',
          name: 'OrderDetail',
          component: () => import('@/views/order/detail.vue'),
          meta: {
            title: '订单详情',
            noCache: true,
          }
        },
        {
          path: 'login',
          name: 'OrderLogin',
          component: () => import('@/views/order/login.vue'),
          meta: {
            title: '验证',
            // hasFooter: true,
          }
        }]
      },
      {
        path: '/map',
        name: 'Map',
        component: () => import('@/views/map/index.vue'),
        meta: {
          title: '定位'
        }
      },
      {
        path: '/submit_success',
        name: 'Submit',
        component: () => import('@/views/home/submitSuccess.vue'),
        meta: {
          title: '订单提交成功'
        }
      },
      {
        path: '/channel',
        name: 'Channel',
        component: () => import('@/views/channel/index.vue'),
        meta: {
          title: '渠道选择',
        }
      },
    ]
  }
]

export default routes
